    $(document).ready(function() {
        Judgeidentity()
        loadTableData()
    })

    //加载表格数据

    function loadTableData() {

        var data = [{
            "name": '消防头盔',
            "address": '栖霞消防大队',
            "person": '张建东',
            "phone": '15698458795',
            "number": '37个'
        }, {
            "name": '消防员灭火防护服',
            "address": '栖霞消防大队',
            "person": '张建东',
            "phone": '15698458795',
            "number": '25套'
        }, {
            "name": '消防手套',
            "address": '栖霞消防大队',
            "person": '张建东',
            "phone": '15698458795',
            "number": '66副'
        }, {
            "name": '消防安全腰带',
            "address": '栖霞消防大队',
            "person": '张建东',
            "phone": '15698458795',
            "number": '14条'
        }, {
            "name": '消防头盔',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '7顶'
        }, {
            "name": '消防员灭火防护服',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '4套'
        }, {
            "name": '消防手套',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '12副'
        }, {
            "name": '消防安全腰带',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '3条'
        }, {
            "name": '消防员灭火防护靴',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '2双'
        }, {
            "name": '佩戴式照明灯',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '1个'
        }, {
            "name": '消防轻型安全绳',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '2条'
        }, {
            "name": '消防腰斧',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '1把'
        }, {
            "name": '消防过滤式综合防毒面具',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '8个'
        }, {
            "name": '正压式消防空气呼吸器',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '2个'
        }, {
            "name": '手持对讲机',
            "address": '马群街道微型消防站',
            "person": '张天宝',
            "phone": '18956487756',
            "number": '2个'
        }]

        layui.use('table', function() {
            var table = layui.table;

            //第一个实例
            table.render({
                title: '',
                text: {
                    none: '暂无数据'
                },
                elem: '#body-content-table',
                skin: 'nob',
                data: data,
                page: { limit: 13, } //开启分页
                ,
                cols: [
                    [ //表头
                        { field: 'name', title: '物资种类', align: 'center' },
                        { field: 'address', title: '存储地址', width: 300, align: 'center', },
                        { field: 'person', title: '负责人', align: 'center' },
                        { field: 'phone', title: '联系方式', align: 'center' },
                        { field: 'number', title: '存储数量', align: 'center' },
                        {
                            title: '物资详情',
                            align: 'center',
                            templet: function(d) {
                                let res = JSON.stringify(d);
                                return `<div><div class="table-tool">
                                    <div onclick='assignTo(${res})'><img src="../static/img/detail.png">详情</div>
                                  </div></div>`
                            },
                        },
                    ]
                ]
            });

        });
    }